package mms

// 医药企业
class MedicineCompany extends Company {

    Person quality // 质量负责人 
    String licence // y药品经营证
    String licenceIssue // 药品经营证获证时间
    String medicalProducts // 医药器械证号
    String medicalProductsIssue // 医药器械获证时间
    String area //面积
    String nature // 企业性质
    String scopeOfBusiness // 经营范围
    String GSPLicence //  GSP认证
    static hasMany = [apothecary:Person]//住店药师
    static xmlTransients = ['history','improper','employees','multimedia','apothecary'] // Web Serivces 

//    static belongsTo = []
//    static transients = []


//    table 'xedu_article'
//    sort  lastTime
    static mapping = {
    }
    //blank 
    //email
    //inList
    //matches 
    //nullable 
    //size
    //unique
    //url 
    static constraints = {
         licence(blank:true)
         licenceIssue()
         medicalProducts()
         medicalProductsIssue()
         area()
         nature()
         scopeOfBusiness(size:0..2000)
         GSPLicence()
         quality(nullable:true)
    }

    String toString() { 
        name
    } 
}
